// 导入模块
const fs = require("fs");

// 读取
function readWX() {
    return new Promise((resolve, reject) => {
        fs.readFile("./assets/为学.md", (err, data) => {
            //如果失败
            if (err) reject(err);
            //如果成功
            resolve(data);
        })
    })
}

function readA() {
    return new Promise((resolve, reject) => {
        fs.readFile("./assets/A.md", (err, data) => {
            //如果失败
            if (err) reject(err);
            //如果成功
            resolve(data);
        })
    })
}

function readB() {
    return new Promise((resolve, reject) => {
        fs.readFile("./assets/B.md", (err, data) => {
            //如果失败
            if (err) reject(err);
            //如果成功
            resolve(data);
        })
    })
}

//声明一个async函数
async function main() {
    let wx = await readWX();
    let a = await readA();
    let b = await readB();
    console.log(wx.toString());
    console.log(a.toString())
    console.log(b.toString());
}

main();